<div class="college-search">
	          <div class="alphabet_links">
               	    <%i=65%>
                    <% 26.times do %>
                    <!--<div><a href="javascript:divmove('<#%=i.chr%>')" > <#%= i.chr %></a> </div>-->
                    <div class="alpha"><a style="color:#000;text-decoration:none;"  onclick = "GetCoordinates('<%=i.chr%>1')"> <%= i.chr %></a></div>
                      <%i=i+1%>
                    <%end%>
                </div>
            <div class="left-column-colleges">
 <% form_remote_tag(:loading => "Element.show('activity');",:complete => "Element.hide('activity');" ,
   :update => "left-column" , :url => {:controller => "main", :action => "view_university", :user_profile => "student"} ) do -%>

       <div class="sort-by">Sort by
       <input type="radio" name="check" <% if @val=="cities" %>   checked=true <%end%> value="cities" onclick="this.form.onsubmit();" >Cities
       <input type="radio" name="check" <% if @val=="alpha" %>   checked=true<%end%> value="alpha" onclick="this.form.onsubmit();">Alphabetical
      </div>
 <%end%>
 <%= image_tag 'spinner.gif', :id => 'activity', :style => 'display:none' %>

 <div id="college_list" class="colleges-name">



  <% if @val=="cities" %>
  <%@a=0-%>
        <%  City.find(:all, :include => :universities ,:order => "name").each do |city| -%>
          <%@a=@a+1 -%>
          <div class="city-institutes">
             <%unless city.universities.empty? -%><div class="city-window" id="<%=city.name[0..0]+@a.to_s-%>"><%= h(city.name) -%></div><%end -%>
             <%unless city.universities.empty? -%>


             <div class="institute-window">
                <%city.universities.each do |university| -%>
                <div class="college" style="clear:both;"><%= link_to h(university.name), { :controller=> "campus" , :action=>"index" , :university =>university.stripped_name, :user_profile => "student"} -%></div>
                <%end-%>
            </div>
            <%end-%>
          </div>
       <%end%>
  <%else%>
      <%
        alpha_univerity = Hash.new
       @universities.each do |university|
        alpha_univerity[university.name[0..0].upcase] = Array.new if alpha_univerity[university.name[0..0].upcase].nil?
        alpha_univerity[university.name[0..0].upcase] << university
        end
      %>
      <%@a=0-%>
  <%"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").each do |alpha_letter| -%>
    <%@a=@a+1 -%>
    <div class="city-institutes">
      <%unless alpha_univerity[alpha_letter].nil? %>
        <div class="city-window" id="<%=alpha_letter.upcase+@a.to_s -%>"> <%=alpha_letter-%> </div>
        <%end -%>
       <%unless alpha_univerity[alpha_letter].nil? %>

       <div class="institute-window">
        <%alpha_univerity[alpha_letter].each do |university| -%>
        <div class="college" style="clear:both;"><%= link_to h("#{university.name}, #{university.city.name}"), { :controller=> "campus" , :action=>"index" , :university =>university.stripped_name, :user_profile => "student"} -%></div>
        <%end%>
      </div>
      <%end%>
      <hr/>
     <%end%>
   </div>
  <%end%>
 </div>

  <div class="no-campus"><a href="">Can't Find Your Campus ?</a></div>
</div>
		</div>